package com.heyige.service;

import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.baomidou.mybatisplus.extension.service.IService;
import com.heyige.entity.MemberLevel;

import java.util.Optional;

public interface MemberLevelService extends IService<MemberLevel> {
    
    /**
     * 根据ID和活跃状态查找会员等级
     */
    Optional<MemberLevel> findByIdAndIsActiveTrue(Long id);
    
    /**
     * 查找所有活跃的会员等级，按排序顺序升序
     */
    Page<MemberLevel> findByIsActiveTrueOrderBySortOrderAsc(Page<MemberLevel> page);
}